-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix/dependent methods #694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Previously, we could die with a <notype> when an implicit argument was not found.
Now handles included test if toplevel implicit is given, but not yet without.
The term in a SearchSuccess has already been adapted to the expected type.
…icits Nothing will be committed here, so setExplore... is the right method to pick.
Necessary to make implicit resolution of type-level peano numbers work. The current commit makes takes the inimal steps to make this happen. We could also consider sharpening using followAlias every type we constrain a result, or every time we adapt a type.
Other depmeth tests in pos/pending still give errors. Needs more investigation. |
val constraint = ctx.typerState.constraint | ||
def inst(tp: Type): Type = tp match { | ||
case TypeBounds(lo, hi) => | ||
if ((lo eq hi) || (hi <:< lo)(ctx.fresh.setExploreTyperState)) inst(lo) else NoType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment explaining why NoType
instead of tp
makes sense here?
is even shorter (and I think clearer than either solution). I wrote the const to save a closure. |
Sadly, Function.const(x) still needs eta expansion and a new closure as it is a method with two param lists, rather than a method with one param list that returns a Function. |
@retronym Ah, that got probably done when we introduced specialization. So, no need to use Function.const. We can drop them at some point in the future. |
Some fixes related to implicit resolution which make some more tests go through. In particular, typelevel Peano numbers. Review by @adriaanm maybe?